#ifndef WHATISTHISDIALOG_H
#define WHATISTHISDIALOG_H

#include <QDialog>
#include <QDialog>
#include <QLabel>
#include <QPushButton>
#include <QTableWidget>
#include <QHBoxLayout>

class GeoFeatureLayer;
class GeoFeature;

namespace Ui {
class WhatIsThisDialog;
}

class WhatIsThisDialog : public QDialog
{
    Q_OBJECT

public:
    explicit WhatIsThisDialog(QWidget *parent = nullptr);
    ~WhatIsThisDialog();
public:
    void setupLayout();
    void setFeature(GeoFeatureLayer* layer, GeoFeature* feature);

signals:
    void closed();

protected:
    virtual void closeEvent(QCloseEvent *) override;

private:
    // feature
    QLabel* labelFID;
    QLabel* labelExtentMinX;
    QLabel* labelExtentMaxX;
    QLabel* labelExtentMinY;
    QLabel* labelExtentMaxY;
    QLabel* labelGeomType;

    // parent
    // belong to layer
    QLabel* labelLayerName;

    // Button
    // Show more info
    QPushButton* btnShowMore;

    // attribute
    QTableWidget* attributeTable;
    QHBoxLayout* attributeTableLayout;
private:
    Ui::WhatIsThisDialog *ui;
};

#endif // WHATISTHISDIALOG_H
